package main

import "fmt"

// 如果你已经知道了数组需要存储的值 可以直接定义

func main() {
	var arrAge = [5]int{1, 2, 3, 4, 6}
	fmt.Printf("arrAge: %v\n", arrAge)

	var arrLazy = [...]int{1, 2, 3, 4, 5}
	fmt.Printf("arrlazy: %v\n", arrLazy)

	var arrLazy2 = []int{1, 2, 3, 4, 5} // 切片
	fmt.Printf("arrLazy2: %v\n", arrLazy2)

	arrKeyValue := [5]int{3: 3, 4: 99}
	fmt.Printf("arrkeyvalue: %v\n", arrKeyValue)

	arrKeyValue2 := []string{4: "zhangsan"} // 切片
	fmt.Printf("arrkeyvalue2: %v\n", arrKeyValue2)
	fmt.Printf("Hello World\n")
}
